package it.fuesi.synoutils.model.emulesearch;

import it.fuesi.synoutils.model.base.BaseApiClientParameters;

/**
 * Created by pascotto on 23/10/14.
 */
public class EmuleSearchClientParameters extends BaseApiClientParameters {

    private String action; //generalsearch - result_enum
    private String key;
    private int type;
    private int fileType;
    private int searchid = 0;

    private String sort = "SOURCE";
    private String dir = "DESC";
    private int start = 0;
    private int limit = 100;


    private boolean started = false;
    private boolean finished = false;

    private int counter = 1;

    public int getCounter() {
        return counter;
    }

    public void setCounter(int counter) {
        this.counter = counter;
    }

    public boolean isStarted() {
        return started;
    }

    public void setStarted(boolean started) {
        this.started = started;
    }

    public boolean isFinished() {
        return finished;
    }

    public void setFinished(boolean finished) {
        this.finished = finished;
    }



    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getFileType() {
        return fileType;
    }

    public void setFileType(int fileType) {
        this.fileType = fileType;
    }

    public int getSearchid() {
        return searchid;
    }

    public void setSearchid(int searchid) {
        this.searchid = searchid;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public String getDir() {
        return dir;
    }

    public void setDir(String dir) {
        this.dir = dir;
    }

    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }

    public int getLimit() {
        return limit;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public static EmuleSearchClientParameters build(boolean expireCache){
        final EmuleSearchClientParameters params = new EmuleSearchClientParameters();
        params.setRefreshCache(expireCache);
        return params;
    }
}
